﻿using NXDO.Data.Factory;
using TDM.DbData.DataEntity;

namespace TDM.WebBiz.Security
{
    public class DaRoleHelper
    {
        /// <summary>
        /// 返回角色信息
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        public static DaRole GetRole(long? roleId)
        {
            roleId = roleId.HasValue ? roleId.Value : 0;
            var sql = "select * from DaRole where RoleID = {0}";
            return DbHelper.SetCommand(sql, roleId).ExecuteEntityScalar<DaRole>();
        }
    }
}
